<?php 

$brands= $_SESSION['sharing']->getRestrictedBrands();
	foreach ($brands as $brand) {
		$_SESSION['sharing']->allowBrand($brand['id']);
		
	}
	if (!empty($_POST['brands'])){
		foreach ($_POST['brands'] as $brand)
		$_SESSION['sharing']->maskBrand($brand);
		
	}
		
	?>